<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\ClientCar;

class CarController extends Controller
{
    public function getList(Request $request)
    {
    	$rs['status'] = false;
    	$where['client_id'] = (int)$request->client_id;
	    $list = ClientCar::where($where)->select(['id','car_num'])->get();
	    if($list) {
	    	$rs['status'] = true;
	    	$rs['data'] = $list;
	    	return response()->json($rs);
	    }
	    return response()->json($rs);
    }
    
    
}
